# 指定内核源码根路径
KERNEL_DIR = /home/robin/work/kernel-rockchip-nanopi4-linux-v4.4.y
# 当前路径
CUR_DIR = $(shell pwd)

APP = virtdev_test

all:
	make -C $(KERNEL_DIR)  M=$(CUR_DIR) modules
	aarch64-linux-gnu-gcc $(APP).c -o $(APP) 

clean:
	make -C $(KERNEL_DIR)  M=$(CUR_DIR) clean
	rm -rf $(MYAPP)

install:
	scp *.ko  $(APP) root@192.168.107.51:/drv_code
# 指定当前目录下哪些文件作为内核模块来编译链接
obj-m = virtdev_drv.o
	
